<!doctype html>
<html class="no-js">
<head>
    <title>ZTE 中兴金融科技</title>
    {{include 'base/style.html'}}
</head>
<body>
<div data-am-widget="tabs"
     class="am-tabs am-tabs-d2"
>
    <ul class="am-tabs-nav am-cf">
        <li class="am-active"><a href="[data-tab-panel-0]">预约信息查询</a></li>
        <li class=""><a href="[data-tab-panel-1]">预约老师</a></li>
        <li class=""><a href="[data-tab-panel-2]">未完定时任务</a></li>
    </ul>
    <div class="am-tabs-bd">
        <div data-tab-panel-0 class="am-tab-panel am-active">
            <form class="am-form">
                    <div class="am-form-group">
                        <label for="date">日期</label>
                        <input type="text" class="am-form-field" id="date" placeholder="输入日期" value="2017-12-02">
                    </div>

                    <div class="am-form-group">
                        <label for="hour">小时</label>
                        <input type="text" class="am-form-field" id="hour" placeholder="输入小时" value="14">
                    </div>
                    <div class="am-form-group">
                        <label for="minute">分钟</label>
                        <input type="text" class="am-form-field" id="minute" placeholder="输入分钟" value="30">
                    </div>

                    <p>
                        <button id="lookview" type="button" class="am-btn am-btn-success">提交</button>
                    </p>

            </form>


        </div>
        <div data-tab-panel-1 class="am-tab-panel ">
              <form class="am-form">
                    <div class="am-form-group">
                        <label for="id">老师ID</label>
                        <input type="text" class="am-form-field" id="id" placeholder="输入老师ID" value="">
                    </div>
                    <p>
                        <button id="lookview_t" type="button" class="am-btn am-btn-success">提交</button>
                    </p>

            </form>


        </div>
        <div data-tab-panel-2 class="am-tab-panel ">
        </div>
    </div>
</div>


<div id="doc123"></div>
<div id="doc456"></div>

{{include 'base/jsFile.html'}}


<script type="text/javascript">

$("#lookview").click(lookview);
$("#lookview_t").click(lookview_t);
function test1() {
    data_param = {"timeType":"LAST_7_DAYS", "hostType":"ALL_HOSTS"}
    $.ajax({//http://10.204.127.36:8000/appweb/api/test/1.json
        url:"http://10.204.127.36:8000/appweb/api/test/1.json",
        type: "POST",
        data:JSON.stringify(data_param),
        headers:{
            "X-Auth-Token":"open-sesame",
            "Content-Type":"application/json"
        },
        contentType: 'text/html; charset=UTF-8',
        dataType: "json",
        success: function(data) {
            alert(JSON.stringify(data)); // Object
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
//            alert(XMLHttpRequest.status);
//            alert(XMLHttpRequest.readyState);
            alert(textStatus);
        },
        complete: function(XMLHttpRequest, textStatus) {
        }
    });

}
function lookview(){
 $.ajax({
                        type: 'POST',
                        async: false,
                        dataType: "json",
                        url: '{{=URL('ylbb','lookview')}}',
                        data: {
                            'date': $("#date").val(),
                            'hour': $("#hour").val(),
                            'minute': $("#minute").val()
                        },
                        success: function (data) {
                            $('#doc123').html(data.data)
                            $('#doc456').html(data.data1);
                        }
                    });


}
function lookview_t(){
 $.ajax({
                        type: 'POST',
                        async: false,
                        dataType: "json",
                        url: '{{=URL('ylbb','lookview_t')}}',
                        data: {
                            'date': $("#date").val(),
                            'hour': $("#hour").val(),
                            'minute': $("#minute").val(),
                            'id': $("#id").val()
                        },
                        success: function (data) {
                            $('#doc123').html(data.data)
                            $('#doc456').html('');
                        }
                    });


}

</script>


</body>
</html>